#include <QtGui/QApplication>
#include <QTextCodec>
#include "mainwindow.h"
#include"dbutil.h"
#include <QFont>
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    //    QApplication::addLibraryPath("./");
    QApplication::addLibraryPath("./Plugins");

    QStringList drivers = QSqlDatabase::drivers();
    foreach(QString driver, drivers)
    //        qDebug() << "\t" << driver;

    QTextCodec::setCodecForTr(QTextCodec::codecForLocale());
    QTextCodec *codec = QTextCodec::codecForName("GB2312");
    QTextCodec::setCodecForLocale(codec);
    QTextCodec::setCodecForCStrings(codec);
    QTextCodec::setCodecForTr(codec);
    QFont font("Nari_pcf");
#ifdef WIN32
    font.setPointSize(9);
#else
    font.setFamily("Nari_pcf");
    font.setPointSize(12);
#endif
    a.setFont(font);

    //    LoginWindow lw;
    //    lw.show();
    MainWindow win;
    win.show();
    //    MainWindow w;
    //    w.show();
    return a.exec();
}
